package com.emmmya.ocs.modules.system.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.emmmya.ocs.common.base.BaseEntity;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 菜单
 */
@Data
@Entity
@Table(name = "h_menu")
@TableName("h_menu")
@ToString
public class Menu extends BaseEntity {
    /**
     * 菜单标题
     */
    @Column(name = "menu_name", unique = true, nullable = false)
    private String menuname;

    /**
     * 菜单等级
     */
    @Column(name = "level", nullable = false)
    private Integer level = 0;

    /**
     * 父级id
     */
    @Column(name = "parent_id")
    private Integer parentId = -1;

    /**
     * 排序
     */
    @Column(name = "sort_no")
    private Double sortNo;

    /**
     * 描述
     */
    @Column(name = "menu_describe")
    private String menuDescribe;

    /**
     * icon代码
     */
    @Column(name = "icon_code")
    private String iconCode;

    /**
     * url
     */
    @Column(name = "url")
    private String url;

    /**
     * 菜单代码
     */
    @Column(name = "menu_code", unique = true, nullable = false)
    private String menuCode;


    /**
     * 状态
     */
    @Column(name = "status")
    private Integer status;

}
